@use '../../../../styles/_globals.scss' as *;

:host {
  --nr-of-days: 5;
  --nr-of-weeks: 6;
  background: transparent;
  display: flex;
  flex-direction: column;
}

// we need this to prevent problems with route ani and scroll behavior
.scroll-wrapper {
  height: 100%;
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--extra-border-color);
  border-bottom: 1px solid var(--extra-border-color);
  box-shadow: var(--whiteframe-shadow-1dp);
  z-index: 10;
  color: var(--text-color);
  background: var(--bg-lighter);
  // to account for scrollbar
  padding-right: 11px;
}

.main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--extra-border-color);
}

.days {
  display: grid;
  place-content: center;
  text-align: center;
  grid-auto-columns: 1fr;
  grid-template-columns: var(--schedule-time-width) repeat(var(--nr-of-days), 1fr);

  --schedule-time-width: 3em;
}

.day {
  line-height: 32px;
  font-size: 18px;
  border-left: 1px solid var(--extra-border-color);

  @include mq(xs, max) {
    font-size: 14px;
    line-height: 20px;
  }
}

.day-num {
  font-weight: 600;
  display: inline;
  padding-right: 6px;
}

.day-day {
  display: inline;
  font-weight: 100;
}

.days.month-view {
  display: block;
  grid-template-columns: none;

  .month-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;

    .month-title {
      font-size: 20px;
      font-weight: 600;

      @include mq(xs, max) {
        font-size: 16px;
        margin-bottom: 3px;
      }
    }
  }

  @include mq(xs, max) {
    padding-bottom: 3px;

    .month-header {
      padding: 6px 12px;
    }
  }
}
